package com.qf.controller;

import com.qf.entity.Hotal;
import com.qf.entity.R;
import com.qf.entity.SearchParams;
import com.qf.service.ISearchHotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/search/hotal")
public class SearchHotalController {
    @Autowired
    private ISearchHotalService searchHotalService;

    @RequestMapping("/list")
    public R<List<Hotal>> searchList(SearchParams searchParams){



        List<Hotal> hotals = searchHotalService.searchHotal(searchParams);
        /*hotals.stream().forEach(System.out::println);*/
        return new R<List<Hotal>>().setData(hotals);
    }
}
